clear
set mem 10000m
set more off 

/*Import the data for the placebo analysis*/

cd "C:\Users\lzeng\Dropbox\Reseach\Soccer project\Gilje Taillard Zeng_Replication"
use Placebo_Analysis_Data.dta

/*Table 11 Panel A: Placebo tests -- Timing of human capital redeployment*/

eststo: areg stay treated_placebo, absorb(shock_year) cluster(shock_club_year)

eststo: areg summer_transfer treated_placebo, absorb(shock_year) cluster(shock_club_year)

eststo: logit summer_transfer treated_placebo i.shock_year, cluster(shock_club_year) or

esttab using Table11_PanelA.csv, starlevels(* 0.1 ** 0.05 *** 0.01) r2(2) replace
eststo clear

/*Table 11 Panel B: Placebo tests -- Productivity of departing human capital*/

gen treated_summer_transfer_placebo = treated_placebo * summer_transfer

eststo:areg shock_pre0_appearance treated_placebo summer_transfer treated_summer_transfer_placebo, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo:areg shock_pre0_minutes treated_placebo summer_transfer treated_summer_transfer_placebo, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo:areg shock_pre0_goals treated_placebo summer_transfer treated_summer_transfer_placebo, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo:areg shock_pre0_assists treated_placebo summer_transfer treated_summer_transfer_placebo, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

esttab using Table11_PanelB.csv, starlevels(* 0.1 ** 0.05 *** 0.01) r2(2) replace
eststo clear

/*Table 11 Panel C: Placebo tests -- Human capital reallocation*/

eststo:areg PL treated_placebo, absorb(shock_year) cluster(shock_club_year)

eststo:areg PL treated_placebo summer_transfer treated_summer_transfer_placebo, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo:logit PL treated_placebo i.shock_year, cluster(shock_club_year) or

eststo:logit PL treated_placebo summer_transfer treated_summer_transfer_placebo i.shock_year, cluster(shock_club_year) or
test summer_transfer + treated_summer_transfer_placebo = 0

esttab using Table11_PanelC.csv, starlevels(* 0.1 ** 0.05 *** 0.01) r2(2)  replace
eststo clear

/*Table 11 Panel D: Placebo tests -- Long-term impact on human capital productivity*/

eststo: areg post_appearance_pl treated_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)

eststo: areg post_appearance_pl treated_placebo summer_transfer treated_summer_transfer_placebo  shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo: areg post_minutes_pl treated_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)

eststo: areg post_minutes_pl treated_placebo summer_transfer treated_summer_transfer_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo: areg post_goals_pl treated_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)

eststo: areg post_goals_pl treated_placebo summer_transfer treated_summer_transfer_placebo  shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

eststo: areg post_assists_pl treated_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)

eststo: areg post_assists_pl treated_placebo summer_transfer treated_summer_transfer_placebo shock_pre0_minutes shock_pre0_goals shock_pre0_assists age, absorb(shock_year) cluster(shock_club_year)
test summer_transfer + treated_summer_transfer_placebo = 0

esttab using Table11_PanelD.csv, starlevels(* 0.1 ** 0.05 *** 0.01) r2(2) replace
eststo clear

